package com.nbsaas.boot.product.rest.convert;

import com.nbsaas.boot.product.data.entity.Product;
import com.nbsaas.boot.product.api.domain.simple.ProductSimple;

import com.nbsaas.boot.rest.api.Converter;

/**
* 商品-列表对象转换器
*/

public class ProductSimpleConvert implements Converter<ProductSimple, Product> {




@Override
public ProductSimple convert(Product source) {
    ProductSimple result = new ProductSimple();

                result.setMarketPrice(source.getMarketPrice());
                result.setCode(source.getCode());
                result.setDescription(source.getDescription());
                result.setType(source.getType());
                result.setHot(source.getHot());
                result.setSeoTitle(source.getSeoTitle());
                result.setSeoKeywords(source.getSeoKeywords());
                result.setSales(source.getSales());
                result.setPrice(source.getPrice());
                result.setId(source.getId());
                result.setStock(source.getStock());
                result.setViews(source.getViews());
                result.setLastDate(source.getLastDate());
                result.setSeoDescription(source.getSeoDescription());
                result.setCostPrice(source.getCostPrice());
                result.setWeight(source.getWeight());
                result.setSort(source.getSort());
                result.setAddDate(source.getAddDate());
                result.setRecommended(source.getRecommended());
                result.setNewProduct(source.getNewProduct());
                result.setVolume(source.getVolume());
                result.setMainImage(source.getMainImage());
                result.setOffSaleTime(source.getOffSaleTime());
                result.setOnSaleTime(source.getOnSaleTime());
                result.setSubtitle(source.getSubtitle());
                result.setBrandId(source.getBrandId());
                result.setName(source.getName());
                result.setParameters(source.getParameters());
                result.setCategoryId(source.getCategoryId());
                result.setStatus(source.getStatus());


    return result;
}

}